home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
17 Bit Software 3: The Continuation
/
17-Bit_The_Continuation_Disc.iso
/
amigan
/
amigan 7
/
zoo
/
zoo.man
< prev
Wrap
Text File
|
1994-01-27
|
15KB
|
526 lines
ZOO(1) UNIX Programmer's Manual ZOO(1)
NAME
zoo - manipulate archives of files in compressed form
SYNOPSIS
zoo {acDehlPTuUvx}[acdEfnMNoOpPquv1] archive [file] ...
zoo -command archive [file] ...
zoo h
DESCRIPTION
Zoo is used to create and maintain collections of files in
compressed form. It uses a Lempel-Ziv compression algorithm
that gives space savings in the range of 20% to 80% depend-
ing on the type of file data.
The command zoo h gives summary of commands.
Before storing a filename in an archive zoo strips out any
directory information. If two or more files are specified
with identical filenames but differing directory names, only
one such filename is used. Zoo will not add an archive to
itself, nor add the archive's backup (with `.bak' extension
to the filename) to the archive, nor add the temporary file
{zoo}.@@@ to an archive.
Zoo has two types of commands: Expert commands, which con-
sist of one command letter followed by zero or more modifier
characters, and Novice commands, which consist of a hyphen
(`-') followed by a command word that may be abbreviated.
Expert commands are case-sensitive but Novice commands are
not.
When zoo adds a file to an existing archive, it marks as
deleted any file that is replaced by a newly-added file.
Deleted files may be later undeleted. Archives may be
packed to recover space occupied by deleted files.
All commands assume that the archive name ends with the
characters `.zoo' unless a different extension is supplied.
Novice commands
Novice commands may be abbreviated down to a minimum of a
hyphen followed by at least one command character. Each
Novice command works in two stages. First, the command does
its intended work. Then, if the result was that one or more
files were deleted in the specified archive, the archive is
packed. If packing occurs, the original unpacked archive is
always left behind in the current directory, with an exten-
sion of `.bak'. The Novice commands are as follows.
-add Adds the specified files to the archive.
Printed 12/31/86 December 31, 1986 1
ZOO(1) UNIX Programmer's Manual ZOO(1)
-freshen
Adds a specified file to the archive if and only if an
older file by the same name already exists in the
archive.
-delete
Deletes the specified files from the archive.
-update
Adds a specified file to the archive either: if an
older file by the same name already exists in the
archive or: if a file by the same name does not
already exist in the archive.
-extract
Extracts the specified files from the archive. If no
file is specified all files are extracted.
-move
Equivalent to -add except that source files are deleted
after addition.
-print
Equivalent to -extract except that extracted data are
sent to standard output.
-list
Gives information about the specified archived files
including any attached comments. If no files are
specified all files are listed. Deleted files are not
listed.
-test
Equivalent to -extract except that the extracted data
are not saved but any errors encountered are reported.
-comment
Allows the user to add or update comments attached to
archived files. When prompted, the user may: type a
carriage return to skip the file, leaving any current
comment unchanged; or type a (possibly null) comment
of up to 65,535 characters terminated by `/end' (case-
insensitive) on a separate line; or type the end-of-
file character (normally control D) to skip all remain-
ing files.
-delete
Deletes the specified files.
The correspondence between Novice and Expert commands is as
follows.
Printed 12/31/86 December 31, 1986 2
ZOO(1) UNIX Programmer's Manual ZOO(1)
Novice Equivalent
Command Description Expert Command
------- ----------- --------------
-add add files to archive aP
-extract extract files from archive x
-move move files to archive aMP
-test test archive integrity xNd
-print extract files and send to standard output xp
-delete delete files from archive DP
-list list information about archived files l
-update update archive by adding new or newer files aunP
-freshen freshen archive by adding newer files auP
-comment allows user to attach comments to files c
Expert commands
The general format of expert commands is:
zoo {acDehlPTuUvx}[dEfnMNoOpPquv1] archive[.zoo] [file] ...
The characters enclosed within {} are commands. Choose any
one of these. The characters enclosed within [] just to the
right of the {} are modifiers and zero or more of these may
immediately follow the command character. All combinations
of command and modifier characters may not be valid.
Files are added to an archive with the command:
zoo {au}[cfMnPqu] archive file ...
Command characters are:
a Add each specified file to archive. Any already-
archived file with the same name is marked as deleted.
u Do an update of the archive. A specified file is added
to the archive only if a copy of it is already in the
archive and the copy being added is newer than the copy
already in the archive.
The following modifiers are specific to these commands.
M Move files to archive. This makes zoo unlink the ori-
ginal files after they have been added to the archive.
Files are unlinked after addition of files to the
archive is complete, and after any requested packing of
the archive has been done, and only if zoo detected no
errors.
n Add new files only. A specified file is added only if
it isn't already in the archive.
Printed 12/31/86 December 31, 1986 3
ZOO(1) UNIX Programmer's Manual ZOO(1)
P Pack archive after files have been added.
u Applied to the a command, this modifier makes it behave
identically to the u command.
The combination of the n modifier with the u modifier or u
command causes addition of a file to the archive either if
the file is not already in the archive, or if the file is
already in the archive but the archived copy is older than
the copy being added.
Files are extracted from an archive with the command:
zoo {ex}[dNoOpq] archive [file] ...
The e and x commands are synonymous. If no file was speci-
fied, all files are extracted from the archive. All
extracted files go into the current directory.
The following modifiers are specific to the e and x com-
mands:
N Do not save extracted data but report any errors
encounterd.
O Overwrite files. Normally, if a file being extracted
would overwrite an already-existing file of the same
name, zoo asks you if you really want to overwrite it.
You may answer the question with `y', which means yes,
overwrite; or `n', which means no, don't overwrite; or
`a', which means assume the answer is `y' for this and
all subsequent files. The O modifier makes zoo assume
that files may always be overwritten.
The O, N, and p modifiers are mutually exclusive.
o This is equivalent to the O modifier if and only if it
is given at least twice. It is otherwise ignored.
p Pipe extracted data to standard output. Error messages
are piped to standard output as well. However, if a
bad CRC is detected, an error message is sent both to
standard error and to standard output.
Archived files are listed with the command:
zoo {lLv}[adfv] archive[.zoo] [file] ...
l Information presented includes the date and time of
each file, its original and current (compressed) sizes,
and the percentage size decrease due to compression
(labelled CF or compression factor). If no filename is
Printed 12/31/86 December 31, 1986 4
ZOO(1) UNIX Programmer's Manual ZOO(1)
supplied all files are listed except deleted files.
L This is identical to the l command except that all sup-
plied arguments must be archives and the contents of
each are listed.
v This causes a verbose listing, which additionally shows
any comment attached to each file. Using the v modif-
ier with the l command has the same effect.
The following modifier is specific to the archive list com-
mands:
a This gives a single-line format containing both each
filename and the name of the archive, sorted by archive
name. It is especially useful with the L command,
since the result can be further sorted on any field to
give a master listing of the entire contents of a set
of archives.
Files may be deleted and undeleted from an archive with the
following commands:
zoo {DU}[Pq1] archive file ...
The D command deletes the specified files and the U command
undeletes the specified files. The 1 modifier (the digit
one, not the letter ell) forces deletion or undeletion of at
most one file. If multiple instances of the same file exist
in an archive, use of the 1 modifier may allow selective
extraction of one of these.
Comments may be added to an archive with the command:
zoo c archive
This behaves identically to the -comment command.
The timestamp of an archive may be adjusted with the com-
mand:
zoo T[q] archive
Zoo normally attempts to maintain the timestamp of an
archive to reflect the age of the newest file stored in it.
Should the timestamp ever be incorrect it can be fixed with
the T command.
An archive may be packed with the command:
zoo P[EPq] archive
Printed 12/31/86 December 31, 1986 5
ZOO(1) UNIX Programmer's Manual ZOO(1)
If the backup copy of the archive already exists, zoo will
refuse to pack the archive unless the P modifier is also
given. The E modifier causes zoo not to save a backup copy
of the original archive after packing. A temporary file
called `{zoo}.@@@' is used to initially hold the packed
archive. This file will be left behind if packing is inter-
rupted or if for some reason this file cannot be renamed to
the name of the original archive when packing is complete.
Packing removes any garbage data appended to an archive
because of Xmodem file transfer and also recovers spaced
used by comments that were replaced.
General modifiers
The following modifiers are applicable to several commands:
c Applied to the a and u commands, this causes the user
to be prompted for a comment for each file added to the
archive. If the file being added has replaced a file
already in the archive, any comment attached to the
replaced file is shown to the user and becomes attached
to the newly-added file unless the user changes it.
Possible user responses are as described for the -com-
ment command. Applied to the archive list command l,
the c modifier causes attached comments to archived
files to be listed.
d Most commands that act on an archive act only on files
that are not deleted. The d modifier makes commands
act on both normal and deleted files. If doubled as
dd, this modifier forces selection only of deleted
files.
f Applied to the a and u commands, the f modifier causes
fast archiving by adding files without compression.
Applied to l it causes a fast listing of files in a
multicolumn format.
q Be quiet. Normally zoo lists the name of each file and
what action it is performing. The q modifier
suppresses this. When files are being extracted to
standard output, the q modifier suppresses the header
preceding each file.
Error messages are never suppressed.
Wildcard handling
The shell normally expands wildcards to a list of matching
files. Wildcards that are meant to match files within an
archive must therefore be escaped or quoted. The wildcard
Printed 12/31/86 December 31, 1986 6
ZOO(1) UNIX Programmer's Manual ZOO(1)
syntax interpreted by zoo is limited to the following char-
acters.
* Matches any sequence of zero or more characters not
containing a dot.
? Matches any single character except a dot.
Arbitrary combinations of ``*'' and ``?'' are allowed.
. Required to match a dot in any filename.
As a special case, the wildcard sequence ``*.*''
matches every filename including those that do not con-
tain a dot.
c-c Two characters separated by a hyphen specify a charac-
ter range. All filenames beginning with those charac-
ters will match. The character range may be specified
only by itself or preceded by a directory name. It is
not specially interpreted if it is part of a filename.
FILES
{zoo}.@@@ - temporary file used during packing
archive_name.bak - backup of archive
SEE ALSO
compress(1)
BUGS
Filenames are converted to a format acceptable to MS-DOS.
Standard input cannot be archived nor can a created archive
be sent to standard output. Spurious error messages may
appear if the filename of an archive is too long.
DIAGNOSTICS
Error messages are intended to be self-explanatory and are
divided into three categories. WARNINGS are intended to
inform the user of an unusual situation, such as a CRC error
during extraction, or attempted extraction of a file that
would replace another that is newer. ERRORS are fatal to
one file, but execution continues with the next file if any.
FATAL errors cause execution to be aborted. The occurrence
of any of these causes an exit status of 1. Normal termina-
tion without any errors gives an exit status of 0.
FUTURE DIRECTIONS
A revised version of zoo is in the works which will handle
filenames and directory names of up to 255 characters each,
allow numbering of multiple versions of a file, and automat-
ically perform end-of-line conversion for text files moved
between dissimilar systems. It will be upward and downward
Printed 12/31/86 December 31, 1986 7
ZOO(1) UNIX Programmer's Manual ZOO(1)
compatible with existing versions of zoo.
AUTHOR
Rahul Dhesi
Printed 12/31/86 December 31, 1986 8